﻿<UserControl x:Class="MyCamera.ImageButton"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Name="UC">
    
    <!-- Thanks to http://blogs.msdn.com/knom -->
    <Grid>
        <Button>
                <Image Source="{Binding ElementName=UC, Path=Image}"
                       Width="{Binding ElementName=UC, Path=ImageWidth}"
                       Height="{Binding ElementName=UC, Path=ImageHeight}"/>
        </Button>
    </Grid>
</UserControl>
